package com.easygem.common.model.business;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;

/**
 * @author 廖思炜
 * @version 1.0
 * @className BgClient
 * @Description TODO 客户表
 * @date 2025/1/13 17:39
 */
@Data
@Table(name = "bg_client")
public class BgClient {
    @Id
    @Column(name = "clientId")
    @ApiModelProperty("主键，客户ID")
    private Long clientId;

    @Column(name = "clientName")
    @ApiModelProperty("客户名称")
    private String clientName;

    @ApiModelProperty("联系人")
    @Column(name = "linkman")
    private String linkman;

    @Column(name = "phone")
    @ApiModelProperty("联系人手机号")
    private String phone;

    @Column(name = "inDustryId")
    @ApiModelProperty("行业类别编号")
    private Integer inDustryId;

    @Column(name = "clientTypeId")
    @ApiModelProperty("客户类型编号")
    private Integer clientTypeId;

    @Column(name = "clientStatusId")
    @ApiModelProperty("客户状态编号")
    private Integer clientStatusId;

    @Column(name = "company")
    @ApiModelProperty("所属公司")
    private String company;

    @Column(name = "staffSize")
    @ApiModelProperty("人员规模")
    private Integer staffSize;

    @Column(name = "clientNo")
    @ApiModelProperty("客户编号")
    private String clientNo;

    @Column(name = "employeeId_aftermarket")
    @ApiModelProperty("所属售后")
    private Long employeeIdAftermarket;

    @TableField(exist = false)
    @ApiModelProperty("所属售后昵称")
    private transient String employeeIdAftermarketNickName;

    @Column(name = "employeeId_market")
    @ApiModelProperty("所属销售")
    private Long employeeIdMarket;

    @ApiModelProperty("所属销售昵称")
    private transient String employeeIdMarketNickName;

    @Column(name = "createTime")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Timestamp createTime;

    @Column(name = "clientCoilInId")
    @ApiModelProperty("进线Id")
    private Integer clientCoilInId;

    @Column(name = "sourceId")
    @ApiModelProperty("客户来源Id")
    private Integer sourceId;

    @Column(name = "intention")
    @ApiModelProperty("是否意向 0为否，1为是")
    private Integer intention;

    @Column(name = "isAttention")
    @ApiModelProperty("是否关注 0为否，1为是")
    private Integer isAttention;

    @Column(name = "remark")
    @ApiModelProperty("备注")
    private String remark;
    //其它表的数据
    @TableField(exist = false)
    @ApiModelProperty("账户名称")
    private transient String accountName;

    @TableField(exist = false)
    @ApiModelProperty("线路类型")
    private transient String circuitType;

    @TableField(exist = false)
    @ApiModelProperty("平台类型")
    private transient String platformType;

    @TableField(exist = false)
    @ApiModelProperty("账户类型")
    private transient String accountType;

    @TableField(exist = false)
    @ApiModelProperty("坐席数")
    private transient Integer seatsNumber;

    @TableField(exist = false)
    @ApiModelProperty("账户余额")
    private transient Double balance;

    @TableField(exist = false)
    @ApiModelProperty("账户余额条件1")
    private transient Double balance1;

    @TableField(exist = false)
    @ApiModelProperty("账户余额条件2")
    private transient Double balance2;

    @TableField(exist = false)
    @ApiModelProperty("状态")
    private transient Integer status;

    @TableField(exist = false)
    @ApiModelProperty("呼叫次数")
    private transient Integer callNumber;

    @TableField(exist = false)
    @ApiModelProperty("有效日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private transient Timestamp inDate;

    @TableField(exist = false)
    @ApiModelProperty("关停时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private transient Timestamp shutdownTime;

    @TableField(exist = false)
    @ApiModelProperty("最后呼叫时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private transient Timestamp lastCallTime;

    @TableField(exist = false)
    @ApiModelProperty("最后更新日期")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private transient Timestamp lastUpdatedDate;
    //其它表的数据
    @TableField(exist = false)
    private transient String inDustryOptions;   //行业类别
    @TableField(exist = false)
    private transient String aftermarket;       //售后

}
